<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="bolao" />
  <g:set var="entityName" value="${message(code: 'group.label', default: 'Group')}" />
  <title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
  <div class="body">
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <div class="dialog">
      <fieldset>
        <legend><g:message code="default.show.label" args="[entityName]" /></legend>
        <table>
          <tbody>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.name.label" default="Name" />:</td>
            <td valign="top" class="value">${fieldValue(bean: group, field: "name")}</td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.cup.label" default="Cup" />:</td>
            <td valign="top" class="value"><g:link controller="cup" action="show" id="${group?.cup?.id}">${group?.cup?.year?.encodeAsHTML()}</g:link> - ${group?.cup?.venue?.encodeAsHTML()}</td>
          </tr>
          <g:ifAnyGranted role="ROLE_ADMIN">
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.dateCreated.label" default="Date Created" />:</td>
            <td valign="top" class="value"><g:formatDate date="${group?.dateCreated}" /></td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.lastUpdated.label" default="Last Updated" />:</td>
            <td valign="top" class="value"><g:formatDate date="${group?.lastUpdated}" /></td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.createdBy.label" default="Created By" />:</td>
            <td valign="top" class="value"><g:link controller="user" action="show" id="${group?.createdBy?.id}">${group?.createdBy?.username?.encodeAsHTML()}</g:link></td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.updatedBy.label" default="Updated By" />:</td>
            <td valign="top" class="value"><g:link controller="user" action="show" id="${group?.updatedBy?.id}">${group?.updatedBy?.username?.encodeAsHTML()}</g:link></td>
          </tr>
          </g:ifAnyGranted>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.active.label" default="Active" />:</td>
            <td valign="top" class="value"><g:formatBoolean boolean="${group?.active}" /></td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name"><g:message code="group.teams.label" default="Teams" />:</td>
            <td valign="top" style="text-align: left;" class="value">
              <ul>
                <g:each in="${group.teams}" var="t">
                  <li><g:link controller="team" action="show" id="${t.id}">${t?.name?.encodeAsHTML()}</g:link></li>
                </g:each>
              </ul>
            </td>
          </tr>
          </tbody>
        </table>
      </fieldset>
    </div>
    <div class="buttons">
      <g:form>
        <g:hiddenField name="id" value="${group?.id}" />
        <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
        <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
      </g:form>
    </div>
  </div>
</body>
</html>
